package controller

import (
	"gin/response"
	"gin/service"
	"gin/validate"
	"github.com/gin-gonic/gin"
)

func AITaskCallBack(ctx *gin.Context) {
	data := validate.AITaskCallBack{}

	err := ctx.ShouldBindJSON(&data)

	if err != nil {
		response.Fail(ctx, nil, err.Error())
		return
	}

	media, err := service.AiTaskCallBack(data)
	if err != nil {
		response.Fail(ctx, nil, err.Error())
		return
	}
	// 查询成功
	response.Success(ctx, gin.H{"data": media}, "success")

}
